#********************************************************************
# Wrapper Java Properties
#********************************************************************
# Java Application
set.LC_CTYPE={{ kafka_arg.lc_ctype }}
set.JAVA_HOME={{ kafka_java_home }}
set.KAFKA_HOME={{ kafka_path }}/kafka
wrapper.java.command=%JAVA_HOME%/bin/java
wrapper.port.min={{ kafka_port.wrapper.split('-')[0] }}
wrapper.port.max={{ kafka_port.wrapper.split('-')[1] }}
wrapper.jvm.port.min={{ kafka_port.wrapper_jvm.split('-')[0] }}
wrapper.jvm.port.max={{ kafka_port.wrapper_jvm.split('-')[1] }}
wrapper.javaio.use_thread=TRUE
wrapper.javaio.buffer_size=10485760

# Limit the use of system-wide resources.
wrapper.ulimit.nproc.soft={{ kafka_arg.ulimit_nproc }}
wrapper.ulimit.nproc.hard={{ kafka_arg.ulimit_nproc }}
wrapper.ulimit.nofile.soft={{ kafka_arg.ulimit_nofile }}
wrapper.ulimit.nofile.hard={{ kafka_arg.ulimit_nofile }}
wrapper.ulimit.core.soft=unlimited
wrapper.ulimit.core.hard=unlimited
wrapper.ulimit.loglevel=STATUS

# Tell the Wrapper to log the full generated Java command line.
wrapper.java.command.loglevel=NONE

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1 = %KAFKA_HOME%/libs/*

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1 = %KAFKA_HOME%/libs

# Java Bits.  On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
wrapper.java.additional.auto_bits=TRUE

# Java Additional Parameters
wrapper.java.additional.1  = -server
wrapper.java.additional.2  = -XX:+UseG1GC
wrapper.java.additional.3  = -XX:MaxGCPauseMillis=20
wrapper.java.additional.4  = -XX:InitiatingHeapOccupancyPercent=35
wrapper.java.additional.5  = -XX:+ExplicitGCInvokesConcurrent
wrapper.java.additional.6  = -Djava.awt.headless=true
wrapper.java.additional.7  = -Dlog4j.configuration=file:%KAFKA_HOME%/config/log4j.properties
wrapper.java.additional.8  = -Dkafka.logs.dir=%KAFKA_HOME%/logs
wrapper.java.additional.9  = -Djava.io.tmpdir=%KAFKA_HOME%/temp
{% if kafka_enable_auth | bool %}
wrapper.java.additional.10 = -Djava.security.auth.login.config=%KAFKA_HOME%/config/jaas.conf
{% endif %}

# Initial Java Heap Size (in MB)
wrapper.java.initmemory={{ kafka_jvm_xmx }}

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory={{ kafka_jvm_xmx }}

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1 = kafka.Kafka
wrapper.app.parameter.2 = %KAFKA_HOME%/config/server.properties

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Enables Debug output from the Wrapper.
# wrapper.debug=TRUE

# Format of output for the console.  (See docs for formats)
wrapper.console.format={{ kafka_arg.wrapper_console_format }}

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel={{ kafka_arg.wrapper_console_loglevel }}

# Log file to use for wrapper output logging.
wrapper.logfile=%KAFKA_HOME%/logs/{{ kafka_arg.wrapper_logfile }}

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format={{ kafka_arg.wrapper_logfile_format }}

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel={{ kafka_arg.wrapper_logfile_loglevel }}

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize={{ kafka_arg.wrapper_logfile_maxsize }}

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles={{ kafka_arg.wrapper_logfile_maxfiles }}

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel={{ kafka_arg.wrapper_syslog_loglevel }}

#********************************************************************
# Wrapper General Properties
#********************************************************************
# Allow for the use of non-contiguous numbered properties
wrapper.ignore_sequence_gaps=TRUE

# Title to use when running as a console
wrapper.console.title=@app.long.name@
